package com.zoe.onelink.common.constant;

/**
 * <p>标题: </p>
 * <p>描述: </p>
 * <p>版权: Copyright (c) 2021</p>
 * <p>公司: 智业软件股份有限公司</p>
 *
 * @version: 1.0
 * @author: ruansheng
 * @date: 2021-08-06
 */
public class TraceSpanConstant {

    public static final String LOG_LENGTH = "logLength";
    public static final String LOG_HEIGHT = "height";
    public static final String LOG_TYPE = "logType";
    public static final String LOG_LEVEL = "logLevel";
    public static final String AUTH_INFO = "auth";
    public static final String EXCEPTION_STACK_TRACE = "ex.stackTrace";
    public static final String EXCEPTION_CLASS_NAME = "ex.className";
    public static final String EXCEPTION_MESSAGE = "ex.msg";
    public static final String EXCEPTION_GROUP = "ex.group";

    public static final String HTTP_URL = "http.url";
    public static final String HTTP_METHOD = "http.method";
    public static final String HTTP_PARAM = "http.param";
    public static final String HTTP_HEADER = "http.header";
    public static final String HTTP_RESULT = "http.result";
    public static final String HTTP_CLIENT_IP = "http.clientIp";

    public static final String RPC_SERVICE = "rpc.service";
    public static final String RPC_METHOD = "rpc.method";
    public static final String RPC_PARAM = "rpc.param";
    public static final String RPC_RESULT = "rpc.result";
    public static final String RPC_REMOTE_ADDR = "rpc.remoteAddr";

    public static final String SQL_ID = "sql.id";
    public static final String SQL_TYPE = "sql.type";
    public static final String SQL_GRAMMAR = "sql.grammar";
    public static final String SQL_PARAM = "sql.param";
    public static final String SQL_HASH = "sql.hash";
    public static final String SQL_ROWS = "sql.rows";
    public static final String SQL_CONSUME = "sql.consume";
    public static final String SQL_LENGTH = "sql.length";
    public static final String SQL_RESULT = "sql.result";
    public static final String SQL_STRATEGY = "sql.strategy";
    public static final String SQL_DATASOURCE = "sql.datasource";

    public static final String EXTRA_POD_IP = "extra.podIp";
    public static final String EXTRA_NODE_IP = "extra.nodeIp";


    public static final class LogType {
        public static final String HTTP = "http";
        public static final String FEIGN = "feign";
        public static final String DUBBO = "dubbo";
        public static final String SQL = "sql";
        public static final String REDIS = "redis";
        public static final String WS = "ws";
        public static final String THIRD_PARTY = "third_party";
    }

    public static final class ExGroup {
        public static final String BIZ = "biz";
        public static final String SYSTEM = "system";
    }


    public static final class B3Propagation {

        public static final String TRACE_ID = "X-B3-TraceId";

        public static final String SPAN_ID = "X-B3-SpanId";

        public static final String PARENT_SPAN_ID = "X-B3-ParentSpanId";

        public static final String SAMPLED = "X-B3-Sampled";
    }

    public static final class Message {

        public static final String PARAM_LENGTH_OVER_LIMIT = "参数长度超过限定值:";

    }


}
